/* style.css - 任务记录网站样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: #4a5568;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.input-section {
    padding: 1.5rem;
    background: #f7fafc;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
}

#taskInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#taskInput:focus {
    border-color: #4299e1;
}

#addTaskBtn {
    padding: 12px 24px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#addTaskBtn:hover {
    background: #3182ce;
}

.tasks-section {
    padding: 1.5rem;
}

.tasks-section h2 {
    margin-bottom: 1rem;
    color: #2d3748;
    font-size: 1.3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

#taskList {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
    transition: all 0.2s;
}

.task-item.completed {
    background: #f0fff4;
    border-left-color: #48bb78;
    text-decoration: line-through;
    color: #718096;
}

.task-checkbox {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    word-break: break-word;
}

.delete-btn {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #c53030;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .input-section {
        flex-direction: column;
    }

    #addTaskBtn {
        padding: 12px;
    }
}

/* 空状态提示 */
#emptyState {
    text-align: center;
    color: #a0aec0;
    padding: 2rem 1rem;
    font-style: italic;
}